import React, { Component } from 'react'
import './index.css'
import Item from '../Item/Item'
import { useSelector } from 'react-redux'
export default function List() {
    let { todos } = useSelector(state => state.todos)
    return (
        <ul className="todo-main">
            {todos.map(todo => (
                <Item key={todo.id} todo={todo}/>
            ))}
        </ul>
    )
}
